from django.test import TestCase
import requests

# Create your tests here.

url = 'http://127.0.0.1:8001/api/comment/2/'

headers = {
    'Authorization': "Bearer " + "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjQ0ODIzMjg1LCJpYXQiOjE2NDQ4MjI5ODUsImp0aSI6IjZmYTdjMjczOGVlODQ3ZTk4MTI4ZTg5MWU4ZGYwNDU0IiwidXNlcl9pZCI6Mn0.rQoxhWUbWknHmTeQvck7ij9Lb-G1anKiACF-e7hBtdA"
}

data = {
    'parent_id': 1,
    'article_id': 1,
    'content': 'comment with jwt'
}

res = requests.put(url, json=data, headers=headers).json()
print(res)